package com.atguigu.yygh.common.utils;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/*==================================
      时 间:   2023-03-20
      讲 师:   刘  辉
      描 述:   尚硅谷教学团队
===================================*/
public class HttpRequestHelper {

    public  static Map<String,String> switchMap(Map<String, String[]> parameterMap ){
        Set<Map.Entry<String, String[]>> entries = parameterMap.entrySet();

        Map<String,String> resultMap=new HashMap<>();

        for (Map.Entry<String, String[]> entry : entries) {
            String key = entry.getKey();
            String value = entry.getValue()[0];
            resultMap.put(key,value);
        }
        return resultMap;
    }
}
